<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
        <link type="text/css" rel="stylesheet" href="../Public/css/reset.css">
    <link type="text/css" rel="stylesheet" href="../Public/css/DateTimePicker.css">
    <link type="text/css" rel="stylesheet" href="../Public/css/style.css">
        <script type="text/javascript" src="../Public/script/jquery.js"></script>
<script type="text/javascript" src="../Public/layer/layer.js"></script>
    <title>提交订单</title>
    <script>

   function check(){
      if (!$("input[name=aid]").is(":checked")) { 
                    layer.alert("请选择收货地址");
                   return false;
                    }

   }

    </script>
    <style>
        .move{
            position: relative;left: 2%
        }
        .icon{
            width: 35px;
            height: 35px;
        }
        .div-icon{
            display: flex;
            flex-direction: row;
            align-items: center;
            padding-top: 1%;
            padding-bottom: 1%;
            border-bottom: 1px solid #eeeeee;
        }
        .dizhi:hover{color:red;}
        .active{
            border: 1px solid firebrick;background-color: burlywood
        }
    </style>
</head>
<body style="background-color: #eeeeee">
<include file="Common:header"/>
<div style="background-color: white;margin: 1.5%;padding: 2%;">
    <div>
        <div style="border-bottom: 1px solid #d8dee4;padding-bottom: 2%">
            <div class="move">
                <span>首页</span> > <span>商城</span> > <span>商品详情</span> > <span>提交订单</span>
            </div>
        </div>
    </div>
    <form action="{:U('Orders/dingdan')}" method="post" onsubmit="return check()" name="form1">
    <div>             
      <volist name="dizhi" id="vo">
                   <input type="radio" name="aid" <if condition='$vo.status eq 1'> checked</if>  value="{$vo.id}">{$vo.diqu}{$vo.address} &nbsp;&nbsp;&nbsp;   ({$vo.name}收) &nbsp;&nbsp;&nbsp;{$vo.tel}
                  </br>
                </volist> 
        <div style="display: flex;flex-direction: row;justify-content: space-between;padding-top: 0.5%;border-bottom: 1px solid #d8dee4;">
            <div style="font-size: 18px;font-weight: 500" class="move"><!-- 确认收货地址 --></div>
            <div style="font-size: 16px;"><a href="{:U('User/dizhi')}" style="text-decoration: none">管理收货地址</a></div>
        </div>
        <div style=" padding-top: 1%;border-bottom: 1px solid #d8dee4;padding-bottom: 1.5%">
            <table width="100%"style=" border-collapse:collapse ">
             
                
   
                <tr>
                    <td>

                    </td>
                    <td>

                    </td>
                    <td>
                        <a  class="dizhi" href="javascript:;" onclick="dizhitj()" style="text-decoration: none">使用其他地址</a>
                    </td>
                    <td>

                    </td>
                    <td>

                    </td>
                    <td>

                    </td>
                    <td>

                    </td>
                </tr>
            </table>
        </div>
    </div>
    <div >
        <div style="font-size: 18px;font-weight: 500;padding-bottom: 1%;padding-top: 1%" class="move">确认订单信息</div>

    <volist name='goods' id='goods'>
        <div >
            <div style="display: flex;flex-direction: row;text-align: center;border-bottom: 2px solid #3bcca3;padding-bottom: 1%">
                <div style="width: 30%">案列名称</div>
                <div style="width: 20%">设计师</div>
                <divd style="width: 20%">风格</divd>
                <div style="width: 20%">价格</div>
            </div>

            <div style="display: flex;flex-direction: row;text-align: center;align-items: center">
                <div style="width: 30% ">
                    <img src="Uploads/{$goods['img']}"
                         style="height: 120px;width: 170px;padding-top: 10px;">
                    <span style="position: relative;bottom: 57px">{$goods['name']}</span>
                </div>
                <div style="width: 20%">{$goods['user']}</div>
                <div style="width: 20%">{$goods['fengge']}</div>
                <div style="width: 20%">{$goods['price']}/㎡</div>
            </div>
        </div>
        <input type="hidden" name='sjid[]' value="{$goods['userid']}">
        <input type="hidden" name='goodid[]' value="{$goods['id']}">
        <div style="display: flex;flex-direction: column;margin-top: 1%">
            <div class="div-icon"style="border-top: 1px solid #eeeeee;"><img src="../Public/images/TD_icon01.png" class="icon"><span style="margin-left: 2%">城市：</span><span>{$goods['chengshi']}</span></div>
       <!--      <div class="div-icon"><img src="../Public/images/sample_icon02.png" class="icon"><span style="margin-left: 2%">房屋类型：</span><span>公寓</span></div> -->
            <div class="div-icon"><img src="../Public/images/sample_icon01.png" class="icon"><span style="margin-left: 2%">户型：</span><span>{$goods['huxing']}</span></div>
            <div class="div-icon"><img src="../Public/images/sample_icon03.png" class="icon"><span style="margin-left: 2%">面积：</span><span>{$goods['area']}㎡</span></div>
            <div class="div-icon"><img src="../Public/images/sample_icon04.png" class="icon"><span style="margin-left: 2%">预算：</span><span>{$goods['baojia']}万</span></div>
        </div>
</volist>
    </div>
    <div style="display: flex;flex-direction: row;justify-content: flex-end;
        width: 100%;text-align: center;color: white;font-size: 16px;align-items: center;
        margin-top: 2%">
        <input type="submit" style="padding: 1.5%;background-color: #03a9f4;width: 8%;border-radius: 5px; border: none;" > 提交订单</div>
    </div>
</div>
</form>



<script>
 function dizhitj(){
layer.open({
          type: 2,
           skin: 'layui-layer-rim', //加上边框
          area: ['720px', '500px'], //宽高
          title:'地址添加',
          content: ['{:U("User/dizhitj")}'],
          end: function(){
                location.reload();
            }

        });




 }
   


</script>
</body>
</html>